<%@ page language="java" import="java.util.*,com.ph.util.pagination.*"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="p" uri="/WEB-INF/tld/pagination.tld"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>上机日志管理信息</title>
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/css/public.css">
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/js/sorttable.js"></script>
		<script language="JavaScript"
			src="${pageContext.request.contextPath}/js/public.js"></script>
		<script language="JavaScript"
			src="${pageContext.request.contextPath}/js/validate.js"></script>
		<script language="JavaScript"
			src="${pageContext.request.contextPath}/js/baseset.js"></script>
		<script language="JavaScript"
			src="${pageContext.request.contextPath}/js/date1.js"></script>
		<script language="JavaScript"
			src="${pageContext.request.contextPath}/js/checkboxSelect.js"></script>

		<script type="text/javascript">
		function getLogByCondition(){			
			var formname = document.getElementById("logForm");//form的ID
			formname.action = "getLogByCondition.action";
				formname.submit();
		}
		
		function deleteLog(){
			if (confirm("确认要清除当前所有日志信息吗？")) {	
				var formname = document.getElementById("logForm");//form的ID			
				formname.action = "deleteLog.action";
				formname.submit();
			}
		}
		
		function downloadLog(){
			if (confirm("确认要引出当前所有日志信息吗？")) {	
				var formname = document.getElementById("logForm");//form的ID			
				formname.action = "downloadLog.action";
				formname.submit();
			}
		}
		</script>
	</head>
	<body>
		<div id="info_all">
			<div id="info_top">
				上机日志
			</div>
			<!-- 主输入区 -->
			<!-- 功能按钮 -->
			<s:form name="logForm" theme="simple" cssStyle="margin-top:0px"
				id="logForm">

				<div id="info_main">
					<!-- 信息显示栏 -->
					<!-- 查询栏 -->
					<div id="btn">
						<input type="button" value="清除" onFocus="this.blur()"
							onmouseover="this.className='btnover'" onClick="deleteLog()"
							onmouseout="this.className='btnout'" class="btnsize" />
						<input type="button" value="引出" onFocus="this.blur()"
							onmouseover="this.className='btnover'" onClick="downloadLog()"
							onmouseout="this.className='btnout'" class="btnsize" />


					</div>
					<div id="select">
						<hr>
						<table>
							<tr>
								<td>
									用户名称&nbsp;
								</td>
								<td>
									<input type="text" name="customerName" size="12">
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								</td>
								<td width="80px">
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日期/时间&nbsp;
								</td>
								<td width="120px" align="left">
									从
									<input size="12" name="timeFrom" readonly='readonly'
										style='cursor: hand' onclick="calendar.setHook(this)">
								</td>
								<td width="20px">
									到
								</td>

								<td>
									<input size="12" name="timeTo" readonly='readonly'
										style='cursor: hand' onclick="calendar.setHook(this)">
								</td>
							</tr>
						</table>

					</div>
					<div class="sele">
						<input type="button" value="查询" onFocus="this.blur()"
							onmouseover="this.className='btnover'"
							onClick="getLogByCondition()"
							onmouseout="this.className='btnout'" class="btnsize" />
						<input type="reset" value="重置" onFocus="this.blur()"
							onmouseover="this.className='btnover'"
							onmouseout="this.className='btnout'" class="btnsize" />
						<hr>
					</div>
					<!-- 信息显示栏 -->
					<div id="info_info1">
						<table id="info_table" width="860px" cellspacing=1px
							cellpadding=1px class="sortable">
							<thead>
								<tr>
									<th width="120px">
										日期/时间
									</th>
									<th width="120px">
										用户名称
									</th>
									<th width="120px">
										操作模块
									</th>
									<th width="80px">
										状态
									</th>
									<!-- 
								<th width="150px">
									内容描述
								</th>
								 -->

								</tr>
							</thead>
							<tbody>
								<s:iterator value="logList" status="status">
									<tr>
										<td>
											<s:property value="logDate" />
										</td>
										<td>
											<s:property value="userName" />
										</td>
										<td>
											<s:property value="moduleName" />
										</td>
										<td>
											<s:property value="state" />
										</td>
										<!-- 
								<td>
									 <s:property value="logInfo"/> 
								</td>
								 -->
									</tr>
								</s:iterator>
							</tbody>
							<tfoot>

							</tfoot>
						</table>
						<s:if test="!logList.isEmpty">
							<tr style="font-size: 12px;">

								<div align="center">
									<font color="#FF0000"> 共<s:property value="page.total" />
										页 第 <s:property value="page.cpage" /> 页 <p:page
											cpage="%{page.cpage}" total="%{page.total}" url="%{page.url}" />
									</font>

								</div>
							</tr>
						</s:if>
						<script language="javascript">  
						//("表格名称","奇数行背景","偶数行背景","点击后背景");
						 mouseclick("info_table","ffffff","ffffff","e6f0fd");
						 //("表格名称","奇数行背景","偶数行背景");
						 //setcolor("t","ffffff","ffffff");
					</script>
					</div>
				</div>
			</s:form>
		</div>

	</body>
</html>